package nguyenbb.com;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import javax.swing.JPanel;

public class Painter extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3300652607673521098L;

	/**
	 * Dimension of Frame
	 */
	protected int width = 500;
	protected int height = 500;

	@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g);
		Graphics2D g2d = (Graphics2D) g;
		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);
		
	}

	/**
	 * getPreferredSize.
	 * 
	 * @return Dimension
	 */
	@Override
	public Dimension getPreferredSize() {
		return new Dimension(this.width, this.height);
	}
}
